#Ex1
class Person:
    # construtor
    def __init__(self,name:str,age:int, nationality:str, habits:str, birthday:str):
        self.__name = name
        self.age = age
        self.nationality = nationality
        self.habits = habits
        self.birthday = birthday # YYYY-MM-DD
        self.happyness = 10
    
    # Getters
    def get_name(self) -> str:
        return self.__name
    
    def get_age(self)->int:
        return self.age
    
    def get_happy(self) -> int:
        return self.happyness
    # get_nationality()


    # Setters
    def setter_name(self, new_name):
        self.__name = new_name

    def setter_happyness(self, delta):
        if (self.happyness + delta < 0):
            print("You cannot go below 0 or you'll suicide")
        else:
            self.happyness += delta

    # Other methods
    def eat(self, dish):
        self.setter_happyness(5)
        print(f'{self.__name} eat {dish} and he is more happy: {self.happyness}')

    def correct_exam(self, number_of_exams):
        print(f"He is correcting {number_of_exams} exams and it is very exhausting")
        self.setter_happyness(-5)

if __name__ == "__main__":
    person1 = Person("Sebastien", 28, "french", "Teaching", "1997-10-05")
    # print(person1.name)
    print(person1.get_name())
    person1.setter_name("鱼火")
    print(person1.get_name())
    person1.eat("hotpot")
    person1.eat("肉夹馍")
    person1.correct_exam(100)
    print(person1.get_happy())


